﻿<Window x:Class="TimeToGo.Presentation.Views.TimesVeiw"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="TimesVeiw" Height="266" Width="286" WindowStartupLocation="CenterOwner">
    <DockPanel LastChildFill="True">
        <Grid DockPanel.Dock="Bottom">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="70*" />
                <ColumnDefinition Width="170*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition />
            </Grid.RowDefinitions>

            <StackPanel 
                Orientation="Horizontal"
                HorizontalAlignment="Right"
                Grid.Column="1">
                <Button Margin="5" Width="75" Height="25" Command="{Binding Path=OkCommand}">OK</Button>
                <Button Margin="5" Width="75" Height="25" Command="{Binding Path=CancelCommand}">Cancel</Button>
            </StackPanel>

            <StackPanel 
                Orientation="Horizontal">
                <Button Margin="5" Width="25" Height="25" Command="{Binding Path=AddCommand}">+</Button>
                <Button Margin="5" Width="25" Height="25" Command="{Binding Path=RemoveCommand}">-</Button>
            </StackPanel>
        </Grid>
        <ListView x:Name="TimesListView" Margin="5,5,5,0" ItemsSource="{Binding Path=Times}" MouseDoubleClick="TimesListView_MouseDoubleClick" KeyDown="TimesListView_KeyDown" >
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Path=Name}" />
                    <GridViewColumn Header="Time" DisplayMemberBinding="{Binding Path=Time}" />
                </GridView>
            </ListView.View>
        </ListView>
    </DockPanel>
</Window>
